<html>
<body>
The main package of the ai package tree.

<br><br>

{@link net.sf.freecol.server.ai.AIMain} has
the responsibility of creating and managing AI-objects.

Each instance of {@link net.sf.freecol.server.ai.AIObject} stores AI-specific information
relating to a single <code>FreeColGameObject</code>. For example:
{@link net.sf.freecol.server.ai.AIUnit AIUnit} contains information about a single unit and has
the methods the AI needs for controlling this unit.

<br><br>
<br><b>Communication with the server</b>
<br><br>
The server uses a <code>Connection</code> when communicating with the clients.
The subclass {@link net.sf.freecol.server.networking.DummyConnection DummyConnection}
is used for the computer controlled players, in order to avoid unnecessary network traffic.
{@link net.sf.freecol.server.ai.AIInGameInputHandler} handles the messages received on 
the <code>DummyConnection</code> and calls the appropriate methods in 
{@link net.sf.freecol.server.ai.AIPlayer}. An example: the method
{@link net.sf.freecol.server.ai.AIPlayer#startWorking} gets invoked when it is the
AI-player's turn.

<br><br>

The ai package is a part of the server so the server model is used by
the computer players. We have defined the following interface for getting/modifying
data within the model:

<ul>
    <li>The AI may access information in the model directly.</li>
    <li>Any changes to the model should be done by sending a network message through the "DummyConnection" the computer player is using. The reason for not changing the model directly, is that the server's control code has the responsibility of updating the clients when a change occurs.</li>
</ul>

This interface is a bit confusing and will probably be changed in the future
(possibly by supporting direct manipulation of the model from the ai-code). 

</body>
</html>
